package com.ray.controller;

import com.ray.pojo.User;
import com.ray.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MybatisController
{
    @Autowired
    UserServiceImpl userService;

    @GetMapping("mybatis")
    public String mybatis()
    {

        User userById = userService.getUserById(1);
        return userById.toString();
    }
}
